<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Os1: DBoW2::TemplatedVocabulary&lt; TDescriptor, F &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Os1
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">OrbSlam2 documentado y modificado</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,'Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_d_bo_w2_1_1_templated_vocabulary.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_d_bo_w2_1_1_templated_vocabulary-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">DBoW2::TemplatedVocabulary&lt; TDescriptor, F &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Generic Vocabulary.  
 <a href="class_d_bo_w2_1_1_templated_vocabulary.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_templated_vocabulary_8h_source.html">TemplatedVocabulary.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for DBoW2::TemplatedVocabulary&lt; TDescriptor, F &gt;:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="class_d_bo_w2_1_1_templated_vocabulary__coll__graph.svg" width="219" height="142"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html">Node</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tree node.  <a href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3679b5a8f2043021a4faab99ccfe4ebe"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a3679b5a8f2043021a4faab99ccfe4ebe">create</a> (const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;training_features)</td></tr>
<tr class="memdesc:a3679b5a8f2043021a4faab99ccfe4ebe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a vocabulary from the training features with the already defined parameters.  <a href="#a3679b5a8f2043021a4faab99ccfe4ebe">More...</a><br /></td></tr>
<tr class="separator:a3679b5a8f2043021a4faab99ccfe4ebe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d48231b043a1102af4c35e256f2054"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a94d48231b043a1102af4c35e256f2054">create</a> (const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;training_features, int k, int L)</td></tr>
<tr class="memdesc:a94d48231b043a1102af4c35e256f2054"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a vocabulary from the training features, setting the branching factor and the depth levels of the tree.  <a href="#a94d48231b043a1102af4c35e256f2054">More...</a><br /></td></tr>
<tr class="separator:a94d48231b043a1102af4c35e256f2054"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e4a3e90f4aa1e6b6ea4d7491c223fd4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a1e4a3e90f4aa1e6b6ea4d7491c223fd4">create</a> (const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;training_features, int k, int L, <a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a> weighting, <a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a> scoring)</td></tr>
<tr class="memdesc:a1e4a3e90f4aa1e6b6ea4d7491c223fd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a vocabulary from the training features, setting the branching factor nad the depth levels of the tree, and the weighting and scoring schemes.  <a href="#a1e4a3e90f4aa1e6b6ea4d7491c223fd4">More...</a><br /></td></tr>
<tr class="separator:a1e4a3e90f4aa1e6b6ea4d7491c223fd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7bbb3cf53f8f9f3610b9b67c551ba8e"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ad7bbb3cf53f8f9f3610b9b67c551ba8e">empty</a> () const</td></tr>
<tr class="memdesc:ad7bbb3cf53f8f9f3610b9b67c551ba8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether the vocabulary is empty (i.e.  <a href="#ad7bbb3cf53f8f9f3610b9b67c551ba8e">More...</a><br /></td></tr>
<tr class="separator:ad7bbb3cf53f8f9f3610b9b67c551ba8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a027d367760c39de816bee5ff0d969837"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a027d367760c39de816bee5ff0d969837">getBranchingFactor</a> () const</td></tr>
<tr class="memdesc:a027d367760c39de816bee5ff0d969837"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the branching factor of the tree (k)  <a href="#a027d367760c39de816bee5ff0d969837">More...</a><br /></td></tr>
<tr class="separator:a027d367760c39de816bee5ff0d969837"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a7d1b3ad0c705705d516a9a144e3f38"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a5a7d1b3ad0c705705d516a9a144e3f38">getDepthLevels</a> () const</td></tr>
<tr class="memdesc:a5a7d1b3ad0c705705d516a9a144e3f38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the depth levels of the tree (L)  <a href="#a5a7d1b3ad0c705705d516a9a144e3f38">More...</a><br /></td></tr>
<tr class="separator:a5a7d1b3ad0c705705d516a9a144e3f38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae67da4c7b30c15ed4faba2ad6ed4549e"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ae67da4c7b30c15ed4faba2ad6ed4549e">getEffectiveLevels</a> () const</td></tr>
<tr class="memdesc:ae67da4c7b30c15ed4faba2ad6ed4549e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the real depth levels of the tree on average.  <a href="#ae67da4c7b30c15ed4faba2ad6ed4549e">More...</a><br /></td></tr>
<tr class="separator:ae67da4c7b30c15ed4faba2ad6ed4549e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03912634600711fbf70355ed32b07f2c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a03912634600711fbf70355ed32b07f2c">getParentNode</a> (<a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> wid, int levelsup) const</td></tr>
<tr class="memdesc:a03912634600711fbf70355ed32b07f2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the id of the node that is "levelsup" levels from the word given.  <a href="#a03912634600711fbf70355ed32b07f2c">More...</a><br /></td></tr>
<tr class="separator:a03912634600711fbf70355ed32b07f2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad830e1e3e547e5d9d45971662afca3d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ad830e1e3e547e5d9d45971662afca3d5">getScoringType</a> () const</td></tr>
<tr class="memdesc:ad830e1e3e547e5d9d45971662afca3d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the scoring method.  <a href="#ad830e1e3e547e5d9d45971662afca3d5">More...</a><br /></td></tr>
<tr class="separator:ad830e1e3e547e5d9d45971662afca3d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadb9343da87e0f00ed3da401c59132b2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aadb9343da87e0f00ed3da401c59132b2">getWeightingType</a> () const</td></tr>
<tr class="memdesc:aadb9343da87e0f00ed3da401c59132b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the weighting method.  <a href="#aadb9343da87e0f00ed3da401c59132b2">More...</a><br /></td></tr>
<tr class="separator:aadb9343da87e0f00ed3da401c59132b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f0d8b15b4f673bf9888ff23489430b4"><td class="memItemLeft" align="right" valign="top">virtual TDescriptor&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a3f0d8b15b4f673bf9888ff23489430b4">getWord</a> (<a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> wid) const</td></tr>
<tr class="memdesc:a3f0d8b15b4f673bf9888ff23489430b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the descriptor of a word.  <a href="#a3f0d8b15b4f673bf9888ff23489430b4">More...</a><br /></td></tr>
<tr class="separator:a3f0d8b15b4f673bf9888ff23489430b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a809f881020a2b953664b1f528828551e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a809f881020a2b953664b1f528828551e">getWordsFromNode</a> (<a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a> nid, std::vector&lt; <a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &gt; &amp;words) const</td></tr>
<tr class="memdesc:a809f881020a2b953664b1f528828551e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the ids of all the words that are under the given node id, by traversing any of the branches that goes down from the node.  <a href="#a809f881020a2b953664b1f528828551e">More...</a><br /></td></tr>
<tr class="separator:a809f881020a2b953664b1f528828551e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace5645b42739bea1e3da05c6cff60bad"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespace_d_bo_w2.html#a55fcd7333e591a38e96b91f41bc182f6">WordValue</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ace5645b42739bea1e3da05c6cff60bad">getWordWeight</a> (<a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> wid) const</td></tr>
<tr class="memdesc:ace5645b42739bea1e3da05c6cff60bad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the weight of a word.  <a href="#ace5645b42739bea1e3da05c6cff60bad">More...</a><br /></td></tr>
<tr class="separator:ace5645b42739bea1e3da05c6cff60bad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdec2031c98b9109451b1454f73348b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#afdec2031c98b9109451b1454f73348b0">load</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:afdec2031c98b9109451b1454f73348b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the vocabulary from a file.  <a href="#afdec2031c98b9109451b1454f73348b0">More...</a><br /></td></tr>
<tr class="separator:afdec2031c98b9109451b1454f73348b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a037ba240314ff30f3620fb4de6845c66"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a037ba240314ff30f3620fb4de6845c66">load</a> (const cv::FileStorage &amp;fs, const std::string &amp;name=&quot;vocabulary&quot;)</td></tr>
<tr class="memdesc:a037ba240314ff30f3620fb4de6845c66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the vocabulary from a file storage node.  <a href="#a037ba240314ff30f3620fb4de6845c66">More...</a><br /></td></tr>
<tr class="separator:a037ba240314ff30f3620fb4de6845c66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8c05732a3c2a063b0a8c1cbc418597a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aa8c05732a3c2a063b0a8c1cbc418597a">loadFromBinaryFile</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:aa8c05732a3c2a063b0a8c1cbc418597a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inspirado en loadFromTextFile, realiza las mismas operaciones pero abriendo un archivo binario.  <a href="#aa8c05732a3c2a063b0a8c1cbc418597a">More...</a><br /></td></tr>
<tr class="separator:aa8c05732a3c2a063b0a8c1cbc418597a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5447d0744100254c4da88ea039fb3414"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a5447d0744100254c4da88ea039fb3414">loadFromTextFile</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:a5447d0744100254c4da88ea039fb3414"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the vocabulary from a text file.  <a href="#a5447d0744100254c4da88ea039fb3414">More...</a><br /></td></tr>
<tr class="separator:a5447d0744100254c4da88ea039fb3414"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5355c25b6f37c11acffe48996e19323f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a5355c25b6f37c11acffe48996e19323f">operator=</a> (const <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp;voc)</td></tr>
<tr class="memdesc:a5355c25b6f37c11acffe48996e19323f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assigns the given vocabulary to this by copying its data and removing all the data contained by this vocabulary before.  <a href="#a5355c25b6f37c11acffe48996e19323f">More...</a><br /></td></tr>
<tr class="separator:a5355c25b6f37c11acffe48996e19323f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92ca49bd6600bddbad145fb6e0543fa1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a92ca49bd6600bddbad145fb6e0543fa1">save</a> (const std::string &amp;filename) const</td></tr>
<tr class="memdesc:a92ca49bd6600bddbad145fb6e0543fa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the vocabulary into a file.  <a href="#a92ca49bd6600bddbad145fb6e0543fa1">More...</a><br /></td></tr>
<tr class="separator:a92ca49bd6600bddbad145fb6e0543fa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3039529c46f02b795450f4fba2207339"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a3039529c46f02b795450f4fba2207339">save</a> (cv::FileStorage &amp;fs, const std::string &amp;name=&quot;vocabulary&quot;) const</td></tr>
<tr class="memdesc:a3039529c46f02b795450f4fba2207339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the vocabulary to a file storage structure.  <a href="#a3039529c46f02b795450f4fba2207339">More...</a><br /></td></tr>
<tr class="separator:a3039529c46f02b795450f4fba2207339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1338b014b856d0a17e71010f6488548e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a1338b014b856d0a17e71010f6488548e">saveToTextFile</a> (const std::string &amp;filename) const</td></tr>
<tr class="memdesc:a1338b014b856d0a17e71010f6488548e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Saves the vocabulary into a text file.  <a href="#a1338b014b856d0a17e71010f6488548e">More...</a><br /></td></tr>
<tr class="separator:a1338b014b856d0a17e71010f6488548e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedde9cc3255e41fd0441055eeb640346"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aedde9cc3255e41fd0441055eeb640346">score</a> (const <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;a, const <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;b) const</td></tr>
<tr class="memdesc:aedde9cc3255e41fd0441055eeb640346"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the score of two vectors.  <a href="#aedde9cc3255e41fd0441055eeb640346">More...</a><br /></td></tr>
<tr class="separator:aedde9cc3255e41fd0441055eeb640346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05a6c2f46184618c9ea8368f53e6980c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a05a6c2f46184618c9ea8368f53e6980c">setScoringType</a> (<a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a> type)</td></tr>
<tr class="memdesc:a05a6c2f46184618c9ea8368f53e6980c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the scoring method.  <a href="#a05a6c2f46184618c9ea8368f53e6980c">More...</a><br /></td></tr>
<tr class="separator:a05a6c2f46184618c9ea8368f53e6980c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8f63a3379debd40214899d996cfc733"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aa8f63a3379debd40214899d996cfc733">setWeightingType</a> (<a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a> type)</td></tr>
<tr class="memdesc:aa8f63a3379debd40214899d996cfc733"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the weighting method.  <a href="#aa8f63a3379debd40214899d996cfc733">More...</a><br /></td></tr>
<tr class="separator:aa8f63a3379debd40214899d996cfc733"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8baad280d6daf74ee43d7cd911363137"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a8baad280d6daf74ee43d7cd911363137">size</a> () const</td></tr>
<tr class="memdesc:a8baad280d6daf74ee43d7cd911363137"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of words in the vocabulary.  <a href="#a8baad280d6daf74ee43d7cd911363137">More...</a><br /></td></tr>
<tr class="separator:a8baad280d6daf74ee43d7cd911363137"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b6721fde54bd8cd008f6a120398741e"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a0b6721fde54bd8cd008f6a120398741e">stopWords</a> (double minWeight)</td></tr>
<tr class="memdesc:a0b6721fde54bd8cd008f6a120398741e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops those words whose weight is below minWeight.  <a href="#a0b6721fde54bd8cd008f6a120398741e">More...</a><br /></td></tr>
<tr class="separator:a0b6721fde54bd8cd008f6a120398741e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0dbbcb6bf766b09f08d945a2af0dbea8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a0dbbcb6bf766b09f08d945a2af0dbea8">TemplatedVocabulary</a> (int k=10, int L=5, <a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a> weighting=<a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467aaa3425e88466862008dff6883e07e205d">TF_IDF</a>, <a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a> scoring=<a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722a2df432e58efd2a13d4950ee96aa6a20f">L1_NORM</a>)</td></tr>
<tr class="memdesc:a0dbbcb6bf766b09f08d945a2af0dbea8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initiates an empty vocabulary.  <a href="#a0dbbcb6bf766b09f08d945a2af0dbea8">More...</a><br /></td></tr>
<tr class="separator:a0dbbcb6bf766b09f08d945a2af0dbea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72fc6a164a5174003d19bd3c54615de6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a72fc6a164a5174003d19bd3c54615de6">TemplatedVocabulary</a> (const std::string &amp;filename)</td></tr>
<tr class="memdesc:a72fc6a164a5174003d19bd3c54615de6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the vocabulary by loading a file.  <a href="#a72fc6a164a5174003d19bd3c54615de6">More...</a><br /></td></tr>
<tr class="separator:a72fc6a164a5174003d19bd3c54615de6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a255d68e7b4235487f8d2d8ea0cbaf43a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a255d68e7b4235487f8d2d8ea0cbaf43a">TemplatedVocabulary</a> (const char *filename)</td></tr>
<tr class="memdesc:a255d68e7b4235487f8d2d8ea0cbaf43a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the vocabulary by loading a file.  <a href="#a255d68e7b4235487f8d2d8ea0cbaf43a">More...</a><br /></td></tr>
<tr class="separator:a255d68e7b4235487f8d2d8ea0cbaf43a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac48ee5331b5d88a4db1a3c93cb0f6a5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aac48ee5331b5d88a4db1a3c93cb0f6a5">TemplatedVocabulary</a> (const <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp;voc)</td></tr>
<tr class="memdesc:aac48ee5331b5d88a4db1a3c93cb0f6a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="#aac48ee5331b5d88a4db1a3c93cb0f6a5">More...</a><br /></td></tr>
<tr class="separator:aac48ee5331b5d88a4db1a3c93cb0f6a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01de3bebec37624439c7d3baf6651ff0"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a01de3bebec37624439c7d3baf6651ff0">transform</a> (const std::vector&lt; TDescriptor &gt; &amp;features, <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;v) const</td></tr>
<tr class="memdesc:a01de3bebec37624439c7d3baf6651ff0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms a set of descriptores into a bow vector.  <a href="#a01de3bebec37624439c7d3baf6651ff0">More...</a><br /></td></tr>
<tr class="separator:a01de3bebec37624439c7d3baf6651ff0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3815440ed610974afc5a2836f54fe07"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#af3815440ed610974afc5a2836f54fe07">transform</a> (const std::vector&lt; TDescriptor &gt; &amp;features, <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;v, <a class="el" href="class_d_bo_w2_1_1_feature_vector.html">FeatureVector</a> &amp;fv, int levelsup) const</td></tr>
<tr class="memdesc:af3815440ed610974afc5a2836f54fe07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transform a set of descriptors into a bow vector and a feature vector.  <a href="#af3815440ed610974afc5a2836f54fe07">More...</a><br /></td></tr>
<tr class="separator:af3815440ed610974afc5a2836f54fe07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5003af19aacb6a322f7fdc0535eb149"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aa5003af19aacb6a322f7fdc0535eb149">transform</a> (const TDescriptor &amp;feature) const</td></tr>
<tr class="memdesc:aa5003af19aacb6a322f7fdc0535eb149"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms a single feature into a word (without weight)  <a href="#aa5003af19aacb6a322f7fdc0535eb149">More...</a><br /></td></tr>
<tr class="separator:aa5003af19aacb6a322f7fdc0535eb149"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d15f985a0c3badc1518be0fbe663099"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a9d15f985a0c3badc1518be0fbe663099">~TemplatedVocabulary</a> ()</td></tr>
<tr class="memdesc:a9d15f985a0c3badc1518be0fbe663099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a9d15f985a0c3badc1518be0fbe663099">More...</a><br /></td></tr>
<tr class="separator:a9d15f985a0c3badc1518be0fbe663099"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a40913d67e369e6993c2eab80a968f829"><td class="memItemLeft" align="right" valign="top">typedef const TDescriptor *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a></td></tr>
<tr class="memdesc:a40913d67e369e6993c2eab80a968f829"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to descriptor.  <a href="#a40913d67e369e6993c2eab80a968f829">More...</a><br /></td></tr>
<tr class="separator:a40913d67e369e6993c2eab80a968f829"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a3244d5a3d0f75ba9c9ae905c5365335d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a3244d5a3d0f75ba9c9ae905c5365335d">createScoringObject</a> ()</td></tr>
<tr class="memdesc:a3244d5a3d0f75ba9c9ae905c5365335d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates an instance of the scoring object accoring to m_scoring.  <a href="#a3244d5a3d0f75ba9c9ae905c5365335d">More...</a><br /></td></tr>
<tr class="separator:a3244d5a3d0f75ba9c9ae905c5365335d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b74d107b7dc6142cbed4e6ef44a8519"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a9b74d107b7dc6142cbed4e6ef44a8519">createWords</a> ()</td></tr>
<tr class="memdesc:a9b74d107b7dc6142cbed4e6ef44a8519"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the words of the vocabulary once the tree has been built.  <a href="#a9b74d107b7dc6142cbed4e6ef44a8519">More...</a><br /></td></tr>
<tr class="separator:a9b74d107b7dc6142cbed4e6ef44a8519"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace8155a70fa5163d117dc6a2ef923205"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ace8155a70fa5163d117dc6a2ef923205">getFeatures</a> (const vector&lt; vector&lt; TDescriptor &gt; &gt; &amp;training_features, vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;features) const</td></tr>
<tr class="memdesc:ace8155a70fa5163d117dc6a2ef923205"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a set of pointers to descriptores.  <a href="#ace8155a70fa5163d117dc6a2ef923205">More...</a><br /></td></tr>
<tr class="separator:ace8155a70fa5163d117dc6a2ef923205"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab79623d30a8550414e1f4bf916869f05"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#ab79623d30a8550414e1f4bf916869f05">HKmeansStep</a> (<a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a> parent_id, const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;descriptors, int current_level)</td></tr>
<tr class="memdesc:ab79623d30a8550414e1f4bf916869f05"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a level in the tree, under the parent, by running kmeans with a descriptor set, and recursively creates the subsequent levels too.  <a href="#ab79623d30a8550414e1f4bf916869f05">More...</a><br /></td></tr>
<tr class="separator:ab79623d30a8550414e1f4bf916869f05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3915e44667d32130e17791147730b7da"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a3915e44667d32130e17791147730b7da">initiateClusters</a> (const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;descriptors, vector&lt; TDescriptor &gt; &amp;clusters) const</td></tr>
<tr class="memdesc:a3915e44667d32130e17791147730b7da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates k clusters from the given descriptors with some seeding algorithm.  <a href="#a3915e44667d32130e17791147730b7da">More...</a><br /></td></tr>
<tr class="separator:a3915e44667d32130e17791147730b7da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4c94955c7e03ec39fc0d9b9ce60009f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aa4c94955c7e03ec39fc0d9b9ce60009f">initiateClustersKMpp</a> (const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;descriptors, vector&lt; TDescriptor &gt; &amp;clusters) const</td></tr>
<tr class="memdesc:aa4c94955c7e03ec39fc0d9b9ce60009f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates k clusters from the given descriptor sets by running the initial step of kmeans++.  <a href="#aa4c94955c7e03ec39fc0d9b9ce60009f">More...</a><br /></td></tr>
<tr class="separator:aa4c94955c7e03ec39fc0d9b9ce60009f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8">setNodeWeights</a> (const vector&lt; vector&lt; TDescriptor &gt; &gt; &amp;features)</td></tr>
<tr class="memdesc:af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the weights of the nodes of tree according to the given features.  <a href="#af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8">More...</a><br /></td></tr>
<tr class="separator:af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5af7e18ab438c3fbbb51bd9930c43444"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a5af7e18ab438c3fbbb51bd9930c43444">transform</a> (const TDescriptor &amp;feature, <a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &amp;id, <a class="el" href="namespace_d_bo_w2.html#a55fcd7333e591a38e96b91f41bc182f6">WordValue</a> &amp;weight, <a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a> *nid=NULL, int levelsup=0) const</td></tr>
<tr class="memdesc:a5af7e18ab438c3fbbb51bd9930c43444"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the word id associated to a feature.  <a href="#a5af7e18ab438c3fbbb51bd9930c43444">More...</a><br /></td></tr>
<tr class="separator:a5af7e18ab438c3fbbb51bd9930c43444"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48a53ffe060c205e44ddd2e173eb96c4"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a48a53ffe060c205e44ddd2e173eb96c4">transform</a> (const TDescriptor &amp;feature, <a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &amp;id) const</td></tr>
<tr class="memdesc:a48a53ffe060c205e44ddd2e173eb96c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the word id associated to a feature.  <a href="#a48a53ffe060c205e44ddd2e173eb96c4">More...</a><br /></td></tr>
<tr class="separator:a48a53ffe060c205e44ddd2e173eb96c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa5f7f829033a49833fe4fb5652b99337"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#aa5f7f829033a49833fe4fb5652b99337">m_k</a></td></tr>
<tr class="memdesc:aa5f7f829033a49833fe4fb5652b99337"><td class="mdescLeft">&#160;</td><td class="mdescRight">Branching factor.  <a href="#aa5f7f829033a49833fe4fb5652b99337">More...</a><br /></td></tr>
<tr class="separator:aa5f7f829033a49833fe4fb5652b99337"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16735d9e2c8b901f01d541faea67971e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a16735d9e2c8b901f01d541faea67971e">m_L</a></td></tr>
<tr class="memdesc:a16735d9e2c8b901f01d541faea67971e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Depth levels.  <a href="#a16735d9e2c8b901f01d541faea67971e">More...</a><br /></td></tr>
<tr class="separator:a16735d9e2c8b901f01d541faea67971e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82be6d310eae6f4f57a72d340489320b"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html">Node</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a82be6d310eae6f4f57a72d340489320b">m_nodes</a></td></tr>
<tr class="memdesc:a82be6d310eae6f4f57a72d340489320b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tree nodes.  <a href="#a82be6d310eae6f4f57a72d340489320b">More...</a><br /></td></tr>
<tr class="separator:a82be6d310eae6f4f57a72d340489320b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d8aa037f2b5c3c5cc953734bb5cb9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a89d8aa037f2b5c3c5cc953734bb5cb9f">m_scoring</a></td></tr>
<tr class="memdesc:a89d8aa037f2b5c3c5cc953734bb5cb9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scoring method.  <a href="#a89d8aa037f2b5c3c5cc953734bb5cb9f">More...</a><br /></td></tr>
<tr class="separator:a89d8aa037f2b5c3c5cc953734bb5cb9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34144d0e2056d6ed8b925a2937b67418"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_d_bo_w2_1_1_general_scoring.html">GeneralScoring</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a34144d0e2056d6ed8b925a2937b67418">m_scoring_object</a></td></tr>
<tr class="memdesc:a34144d0e2056d6ed8b925a2937b67418"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object for computing scores.  <a href="#a34144d0e2056d6ed8b925a2937b67418">More...</a><br /></td></tr>
<tr class="separator:a34144d0e2056d6ed8b925a2937b67418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf03c6430d630674ddca5bab9c120c51"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#abf03c6430d630674ddca5bab9c120c51">m_weighting</a></td></tr>
<tr class="memdesc:abf03c6430d630674ddca5bab9c120c51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Weighting method.  <a href="#abf03c6430d630674ddca5bab9c120c51">More...</a><br /></td></tr>
<tr class="separator:abf03c6430d630674ddca5bab9c120c51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1665546b54f954d2d54d59a6982df3ca"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html">Node</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a1665546b54f954d2d54d59a6982df3ca">m_words</a></td></tr>
<tr class="memdesc:a1665546b54f954d2d54d59a6982df3ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Words of the vocabulary (tree leaves) this condition holds: m_words[wid]-&gt;word_id == wid.  <a href="#a1665546b54f954d2d54d59a6982df3ca">More...</a><br /></td></tr>
<tr class="separator:a1665546b54f954d2d54d59a6982df3ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class TDescriptor, class F&gt;<br />
class DBoW2::TemplatedVocabulary&lt; TDescriptor, F &gt;</h3>

<p>Generic Vocabulary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">TDescriptor</td><td>class of descriptor </td></tr>
    <tr><td class="paramname">F</td><td>class of descriptor functions </td></tr>
  </table>
  </dd>
</dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a40913d67e369e6993c2eab80a968f829"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">typedef const TDescriptor* <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Pointer to descriptor. </p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0dbbcb6bf766b09f08d945a2af0dbea8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em> = <code>10</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>L</em> = <code>5</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a>&#160;</td>
          <td class="paramname"><em>weighting</em> = <code><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467aaa3425e88466862008dff6883e07e205d">TF_IDF</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a>&#160;</td>
          <td class="paramname"><em>scoring</em> = <code><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722a2df432e58efd2a13d4950ee96aa6a20f">L1_NORM</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initiates an empty vocabulary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">k</td><td>branching factor </td></tr>
    <tr><td class="paramname">L</td><td>depth levels </td></tr>
    <tr><td class="paramname">weighting</td><td>weighting type </td></tr>
    <tr><td class="paramname">scoring</td><td>scoring type </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a72fc6a164a5174003d19bd3c54615de6"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a> </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates the vocabulary by loading a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a255d68e7b4235487f8d2d8ea0cbaf43a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates the vocabulary by loading a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aac48ee5331b5d88a4db1a3c93cb0f6a5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp;&#160;</td>
          <td class="paramname"><em>voc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copy constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">voc</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9d15f985a0c3badc1518be0fbe663099"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::~<a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a3679b5a8f2043021a4faab99ccfe4ebe"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::create </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>training_features</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates a vocabulary from the training features with the already defined parameters. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">training_features</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a94d48231b043a1102af4c35e256f2054"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::create </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>training_features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>L</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates a vocabulary from the training features, setting the branching factor and the depth levels of the tree. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">training_features</td><td></td></tr>
    <tr><td class="paramname">k</td><td>branching factor </td></tr>
    <tr><td class="paramname">L</td><td>depth levels </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1e4a3e90f4aa1e6b6ea4d7491c223fd4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::create </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; std::vector&lt; TDescriptor &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>training_features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>k</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>L</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a>&#160;</td>
          <td class="paramname"><em>weighting</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a>&#160;</td>
          <td class="paramname"><em>scoring</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates a vocabulary from the training features, setting the branching factor nad the depth levels of the tree, and the weighting and scoring schemes. </p>

</div>
</div>
<a id="a3244d5a3d0f75ba9c9ae905c5365335d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::createScoringObject </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates an instance of the scoring object accoring to m_scoring. </p>

</div>
</div>
<a id="a9b74d107b7dc6142cbed4e6ef44a8519"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::createWords </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create the words of the vocabulary once the tree has been built. </p>

</div>
</div>
<a id="ad7bbb3cf53f8f9f3610b9b67c551ba8e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns whether the vocabulary is empty (i.e. </p>
<p>it has not been trained) </p><dl class="section return"><dt>Returns</dt><dd>true iff the vocabulary is empty </dd></dl>

</div>
</div>
<a id="a027d367760c39de816bee5ff0d969837"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getBranchingFactor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the branching factor of the tree (k) </p>
<dl class="section return"><dt>Returns</dt><dd>k </dd></dl>

</div>
</div>
<a id="a5a7d1b3ad0c705705d516a9a144e3f38"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getDepthLevels </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the depth levels of the tree (L) </p>
<dl class="section return"><dt>Returns</dt><dd>L </dd></dl>

</div>
</div>
<a id="ae67da4c7b30c15ed4faba2ad6ed4549e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">float <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getEffectiveLevels </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the real depth levels of the tree on average. </p>
<dl class="section return"><dt>Returns</dt><dd>average of depth levels of leaves </dd></dl>

</div>
</div>
<a id="ace8155a70fa5163d117dc6a2ef923205"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getFeatures </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; vector&lt; TDescriptor &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>training_features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a set of pointers to descriptores. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">training_features</td><td>all the features </td></tr>
    <tr><td class="paramname">features</td><td>(out) pointers to the training features </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a03912634600711fbf70355ed32b07f2c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getParentNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a>&#160;</td>
          <td class="paramname"><em>wid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>levelsup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the id of the node that is "levelsup" levels from the word given. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wid</td><td>word id </td></tr>
    <tr><td class="paramname">levelsup</td><td>0..L </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>node id. if levelsup is 0, returns the node id associated to the word id </dd></dl>

</div>
</div>
<a id="ad830e1e3e547e5d9d45971662afca3d5"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getScoringType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the scoring method. </p>
<dl class="section return"><dt>Returns</dt><dd>scoring method </dd></dl>

</div>
</div>
<a id="aadb9343da87e0f00ed3da401c59132b2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getWeightingType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the weighting method. </p>
<dl class="section return"><dt>Returns</dt><dd>weighting method </dd></dl>

</div>
</div>
<a id="a3f0d8b15b4f673bf9888ff23489430b4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TDescriptor <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getWord </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a>&#160;</td>
          <td class="paramname"><em>wid</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the descriptor of a word. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wid</td><td>word id </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>descriptor </dd></dl>

</div>
</div>
<a id="a809f881020a2b953664b1f528828551e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getWordsFromNode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a>&#160;</td>
          <td class="paramname"><em>nid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>words</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the ids of all the words that are under the given node id, by traversing any of the branches that goes down from the node. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nid</td><td>starting node id </td></tr>
    <tr><td class="paramname">words</td><td>ids of words </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ace5645b42739bea1e3da05c6cff60bad"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#a55fcd7333e591a38e96b91f41bc182f6">WordValue</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::getWordWeight </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a>&#160;</td>
          <td class="paramname"><em>wid</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the weight of a word. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wid</td><td>word id </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>weight </dd></dl>

</div>
</div>
<a id="ab79623d30a8550414e1f4bf916869f05"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::HKmeansStep </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a>&#160;</td>
          <td class="paramname"><em>parent_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>descriptors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>current_level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates a level in the tree, under the parent, by running kmeans with a descriptor set, and recursively creates the subsequent levels too. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent_id</td><td>id of parent node </td></tr>
    <tr><td class="paramname">descriptors</td><td>descriptors to run the kmeans on </td></tr>
    <tr><td class="paramname">current_level</td><td>current level in the tree </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3915e44667d32130e17791147730b7da"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::initiateClusters </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>descriptors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; TDescriptor &gt; &amp;&#160;</td>
          <td class="paramname"><em>clusters</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates k clusters from the given descriptors with some seeding algorithm. </p>
<dl class="section note"><dt>Note</dt><dd>In this class, kmeans++ is used, but this function should be overriden by inherited classes. </dd></dl>

</div>
</div>
<a id="aa4c94955c7e03ec39fc0d9b9ce60009f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::initiateClustersKMpp </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html#a40913d67e369e6993c2eab80a968f829">pDescriptor</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>descriptors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">vector&lt; TDescriptor &gt; &amp;&#160;</td>
          <td class="paramname"><em>clusters</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates k clusters from the given descriptor sets by running the initial step of kmeans++. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">descriptors</td><td></td></tr>
    <tr><td class="paramname">clusters</td><td>resulting clusters </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afdec2031c98b9109451b1454f73348b0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::load </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads the vocabulary from a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a037ba240314ff30f3620fb4de6845c66"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::load </td>
          <td>(</td>
          <td class="paramtype">const cv::FileStorage &amp;&#160;</td>
          <td class="paramname"><em>fs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;vocabulary&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Loads the vocabulary from a file storage node. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fn</td><td>first node </td></tr>
    <tr><td class="paramname">subname</td><td>name of the child node of fn where the tree is stored. If not given, the fn node is used instead </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa8c05732a3c2a063b0a8c1cbc418597a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::loadFromBinaryFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inspirado en loadFromTextFile, realiza las mismas operaciones pero abriendo un archivo binario. </p>
<p>El archivo binario con el vocabulario ocupa un tercio del de texto, y carga infinitamente más rápido al evitar el parse. Al cargar el descriptor, utiliza <a class="el" href="class_d_bo_w2_1_1_f_o_r_b.html#afa1b3415e0289849d56bffd0205be4d8" title="Devuelve un descriptor a partir de sus datos binarios en un array. ">FORB::fromArray</a> en lugar de <a class="el" href="class_d_bo_w2_1_1_f_o_r_b.html#a4023e7775d0691b44f6708f865b6b8d7" title="Returns a descriptor from a string. ">FORB::fromString</a>. fromArray es una versión modificada para esto, inspirada en fromString. </p>

</div>
</div>
<a id="a5447d0744100254c4da88ea039fb3414"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::loadFromTextFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads the vocabulary from a text file. </p>
<p>Abre el vocabulario de BOW a partir de un archivo de texto.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>El archivo consiste de números en ASCII separados por espacios y saltos de línea. La primera línea contiene 4 números para las propiedades: m_k, m_L, m_scoring y m_weighting.<ul>
<li>m_scoring, de 0 a 5, es el tipo de scoring</li>
<li>m_weighting, de 0 a 3, es el tipo de ponderación</li>
<li>m_k, de 0 a 20, cantidad máxima de ramas por nodo</li>
<li>m_L, de 1 a 10, niveles del árbol (menos uno)</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<p>Las siguientes líneas (una por descriptor BRIEF de 256 bits) tienen todas el mismo formato, con el vocabulario de BOW, en este orden: 1- int, nº de nodo, se repite en varias filas. 2- bool: 0 o 1, 1 indica que el nodo es hoja (sin ramas). 3- uchar, 32 bytes en las posiciones 3 a 34, 256 bits del descriptor 35- double (WordValue en BOW), para la propiedad <a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html#ae1e261135cb7af400f1c4c4795cdba41" title="Weight if the node is a word. ">Node.weight</a></p>
<p>Cada fila se podría guardar en binario, ocupando 45 bytes en lugar de 120 caracteres, reduciendo el archivo a un tercio, lo mismo que su tiempo de lectura, y mucho más el tiempo de procesamiento. </p>

</div>
</div>
<a id="a5355c25b6f37c11acffe48996e19323f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a>&lt; TDescriptor, F &gt; &amp;&#160;</td>
          <td class="paramname"><em>voc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Assigns the given vocabulary to this by copying its data and removing all the data contained by this vocabulary before. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">voc</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to this vocabulary </dd></dl>

</div>
</div>
<a id="a92ca49bd6600bddbad145fb6e0543fa1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::save </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Saves the vocabulary into a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3039529c46f02b795450f4fba2207339"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::save </td>
          <td>(</td>
          <td class="paramtype">cv::FileStorage &amp;&#160;</td>
          <td class="paramname"><em>fs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em> = <code>&quot;vocabulary&quot;</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Saves the vocabulary to a file storage structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">fn</td><td>node in file storage </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1338b014b856d0a17e71010f6488548e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::saveToTextFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Saves the vocabulary into a text file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aedde9cc3255e41fd0441055eeb640346"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::score </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the score of two vectors. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>vector </td></tr>
    <tr><td class="paramname">b</td><td>vector </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>score between vectors </dd></dl>
<dl class="section note"><dt>Note</dt><dd>the vectors must be already sorted and normalized if necessary </dd></dl>

</div>
</div>
<a id="af7bf0ecd2d1ecc7d31ddca3aa7d1ddc8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::setNodeWeights </td>
          <td>(</td>
          <td class="paramtype">const vector&lt; vector&lt; TDescriptor &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the weights of the nodes of tree according to the given features. </p>
<p>Before calling this function, the nodes and the words must be already created (by calling HKmeansStep and createWords) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">features</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a05a6c2f46184618c9ea8368f53e6980c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::setScoringType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a>&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes the scoring method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>new scoring type </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa8f63a3379debd40214899d996cfc733"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::setWeightingType </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a>&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Changes the weighting method. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>new weighting type </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a8baad280d6daf74ee43d7cd911363137"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the number of words in the vocabulary. </p>
<dl class="section return"><dt>Returns</dt><dd>number of words </dd></dl>

</div>
</div>
<a id="a0b6721fde54bd8cd008f6a120398741e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::stopWords </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>minWeight</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stops those words whose weight is below minWeight. </p>
<p>Words are stopped by setting their weight to 0. There are not returned later when transforming image features into vectors. Note that when using IDF or TF_IDF, the weight is the idf part, which is equivalent to -log(f), where f is the frequency of the word (f = Ni/N, Ni: number of training images where the word is present, N: number of training images). Note that the old weight is forgotten, and subsequent calls to this function with a lower minWeight have no effect. </p><dl class="section return"><dt>Returns</dt><dd>number of words stopped now </dd></dl>

</div>
</div>
<a id="a01de3bebec37624439c7d3baf6651ff0"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::transform </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; TDescriptor &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transforms a set of descriptores into a bow vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">features</td><td></td></tr>
    <tr><td class="paramname">v</td><td>(out) bow vector of weighted words </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af3815440ed610974afc5a2836f54fe07"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::transform </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; TDescriptor &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_d_bo_w2_1_1_bow_vector.html">BowVector</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_d_bo_w2_1_1_feature_vector.html">FeatureVector</a> &amp;&#160;</td>
          <td class="paramname"><em>fv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>levelsup</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transform a set of descriptors into a bow vector and a feature vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">features</td><td></td></tr>
    <tr><td class="paramname">v</td><td>(out) bow vector </td></tr>
    <tr><td class="paramname">fv</td><td>(out) feature vector of nodes and feature indexes </td></tr>
    <tr><td class="paramname">levelsup</td><td>levels to go up the vocabulary tree to get the node index </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa5003af19aacb6a322f7fdc0535eb149"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::transform </td>
          <td>(</td>
          <td class="paramtype">const TDescriptor &amp;&#160;</td>
          <td class="paramname"><em>feature</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Transforms a single feature into a word (without weight) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">feature</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>word id </dd></dl>

</div>
</div>
<a id="a5af7e18ab438c3fbbb51bd9930c43444"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::transform </td>
          <td>(</td>
          <td class="paramtype">const TDescriptor &amp;&#160;</td>
          <td class="paramname"><em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a55fcd7333e591a38e96b91f41bc182f6">WordValue</a> &amp;&#160;</td>
          <td class="paramname"><em>weight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#a3a0fa9c50c0df508759362d6204566f2">NodeId</a> *&#160;</td>
          <td class="paramname"><em>nid</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>levelsup</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the word id associated to a feature. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">feature</td><td></td></tr>
    <tr><td class="paramname">id</td><td>(out) word id </td></tr>
    <tr><td class="paramname">weight</td><td>(out) word weight </td></tr>
    <tr><td class="paramname">nid</td><td>(out) if given, id of the node "levelsup" levels up </td></tr>
    <tr><td class="paramname">levelsup</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a48a53ffe060c205e44ddd2e173eb96c4"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor , class F &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::transform </td>
          <td>(</td>
          <td class="paramtype">const TDescriptor &amp;&#160;</td>
          <td class="paramname"><em>feature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespace_d_bo_w2.html#ab1a0d3283b2d4690a383372ed20bfeb5">WordId</a> &amp;&#160;</td>
          <td class="paramname"><em>id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the word id associated to a feature. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">feature</td><td></td></tr>
    <tr><td class="paramname">id</td><td>(out) word id </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa5f7f829033a49833fe4fb5652b99337"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_k</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Branching factor. </p>

</div>
</div>
<a id="a16735d9e2c8b901f01d541faea67971e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_L</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Depth levels. </p>

</div>
</div>
<a id="a82be6d310eae6f4f57a72d340489320b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html">Node</a>&gt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_nodes</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Tree nodes. </p>

</div>
</div>
<a id="a89d8aa037f2b5c3c5cc953734bb5cb9f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#aa252a592dd607c6e60dede06ceef2722">ScoringType</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_scoring</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Scoring method. </p>

</div>
</div>
<a id="a34144d0e2056d6ed8b925a2937b67418"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_d_bo_w2_1_1_general_scoring.html">GeneralScoring</a>* <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_scoring_object</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Object for computing scores. </p>

</div>
</div>
<a id="abf03c6430d630674ddca5bab9c120c51"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespace_d_bo_w2.html#a5de5c8a307aca9a84ffefda2a9bc467a">WeightingType</a> <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_weighting</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Weighting method. </p>

</div>
</div>
<a id="a1665546b54f954d2d54d59a6982df3ca"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class TDescriptor, class F&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="struct_d_bo_w2_1_1_templated_vocabulary_1_1_node.html">Node</a>*&gt; <a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">DBoW2::TemplatedVocabulary</a>&lt; TDescriptor, F &gt;::m_words</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Words of the vocabulary (tree leaves) this condition holds: m_words[wid]-&gt;word_id == wid. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/home/alejandro/Desarrollo eclipse/os1/Thirdparty/DBoW2/DBoW2/<a class="el" href="_templated_vocabulary_8h_source.html">TemplatedVocabulary.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_d_bo_w2.html">DBoW2</a></li><li class="navelem"><a class="el" href="class_d_bo_w2_1_1_templated_vocabulary.html">TemplatedVocabulary</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.12 </li>
  </ul>
</div>
</body>
</html>
